import { httpTokenRequest } from '../utils/http.js';

//获取小竹资讯列表
export function getList(params) {
  return httpTokenRequest({
    url: '/api/imformation/getList',
    method: 'POST',
    params: params
  });
}
//获取小竹咨询分类
export function getCate(params) {
  return httpTokenRequest({
    url: '/api/imformation/getCate',
    method: 'POST',
    params: params
  });
}

// 展示热门资讯列表
export function getHotInformation(params) {
  return httpTokenRequest({
    url: '/api/imformation/hot_imformation',
    method: 'POST',
    params: params
  });
}

// 获取小竹资讯详情
export function getInfo(params) {
  return httpTokenRequest({
    url: '/api/imformation/getListinfo',
    method: 'POST',
    params: params
  });
}

// 相关推荐列表
export function getRelevant(params) {
  return httpTokenRequest({
    url: '/api/imformation/getrelevant',
    method: 'POST',
    params: params
  });
}

// 资讯收藏/取消收藏
export function collect(params) {
  return httpTokenRequest({
    url: '/api/imformation/setCollect',
    method: 'POST',
    params: params
  });
}
// 获取历史搜索
export function getHistorySearch(params) {
  return httpTokenRequest({
    url: '/api/imformation/getHistorySearch',
    method: 'POST',
    params: params
  });
}
// 清空历史搜索记录
export function delHistorySearch(params) {
  return httpTokenRequest({
    url: '/api/imformation/delHistorySearch',
    method: 'POST',
    params: params
  });
}
// 获取热门搜索
export function getHotSearch(params) {
  return httpTokenRequest({
    url: '/api/imformation/getHotSearch',
    method: 'POST',
    params: params
  });
}
